package com.saicmotor.springboot_demo.model;

import com.saicmotor.springboot_demo.config.ValidateGroup;

import javax.validation.constraints.NotBlank;
import java.sql.Timestamp;

public class UserRoleInfo {
    private int id;
    private int userId;
    @NotBlank(message = "user name cannot be blank",groups = {ValidateGroup.UserRoleAdd.class, ValidateGroup.UserRoleUserDelete.class})
    private String userName;
    private int roleId;
    @NotBlank(message = "role_name cannot be blank",groups = {ValidateGroup.UserRoleAdd.class, ValidateGroup.UserRoleRoleDelete.class})
    private String roleName;
    private Timestamp createdAt;
    private Timestamp updatedAt;
    private int deleted;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getRoleId() {
        return roleId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    public Timestamp getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Timestamp updatedAt) {
        this.updatedAt = updatedAt;
    }


    public void setDeleted(int deleted) {
        this.deleted = deleted;
    }
}
